function useLoginStatus(): IUseLoginStatusResult {
	const createGlobalLoginStatusManager = () => {
		let $loginManger = <ILoginStatusManger>{};

		$loginManger.$interceptor = new Promise((resolve, reject) => {
			$loginManger.$resolve = resolve
			uni.loginManger = $loginManger
		})
	}

	const plugin = () => {
		const install = () => {
			createGlobalLoginStatusManager();
		}
		return {
			install
		}
	}

	return {
		createGlobalLoginStatusManager,
		plugin
	}
}

export {
	useLoginStatus
}